package com.market.mapper;

import com.market.entity.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityMapper {
    List<Commodity> selects();

    /**
     * 查询ID
     *
     * @return
     */
    List<Commodity> selectId();

    /**
     * 查询零售价
     *
     * @return
     */
    Commodity selectRetailPrice(@Param("commodityId") Long commodityId);

    /**
     * 新增商品
     *
     * @param commodity
     * @return
     */
    int insers(@Param("commodity") Commodity commodity);

    /**
     * 修改商品
     * @param commodity
     * @return
     */
    int update(@Param("commodity") Commodity commodity);

    /**
     * 删除商品
     * @param commodityId
     * @return
     */
    int deleteBrand(@Param("commodityId") Integer commodityId);
}
